Field of the Invention
This disclosure relates to an image processing apparatus, an image processing method, and a recording medium.
Description of the Related Art
There are cases where a part of light entering a lens forming an image pickup optical system is reflected by an interface of the lens or a member holding the lens, to thereby reach an image pickup surface. Such unnecessary light generates an unnecessary component, for example, ghost or flare, in an image. There are also cases where, when a diffractive optical element is used to correct axial chromatic aberration and lateral chromatic aberration, light from an object having a high luminance and being located outside an image pickup field angle, for example, the sun, is diffracted by the diffractive optical element to generate the unnecessary component in the image. Under such circumstances, there have been proposed methods for reducing the unnecessary light. In Japanese Patent Application Laid-Open No. 2008-54206, there is disclosed a method of detecting ghost based on a difference between an image in a focused state and an image in a de-focused state. Further, in Japanese Patent No. 5284306, there is disclosed a method of detecting ghost by comparing a plurality of viewpoint images taken by single-lens stereoscopic imaging.
However, in the related art, there have been cases where the unnecessary component cannot always be reduced satisfactorily, and where a large processing load is generated.